The present invention relates to a method and apparatus for the insertion, and subsequent decoding, of coded information into images.
It is known to insert codes into images for example video transmissions or video clips or stills transmitted across a telecommunication link, for the purpose of identifying the owner of the images. There are a number of known schemes for inserting identification codes into the sync periods, and more recently it has been proposed to insert identification codes into the image itself, but in such a manner that the code cannot be detected by the eye.
WO 95/14289 discloses the embedding of an identification code throughout an image by modulating a digitised version of the image with a small noise signal. The specific system described suffers from the disadvantage of requiring to have to hand the original image for code identification. Further improvements in code robustness for transmission over telecommunications links or broadcasting are also desirable.
WO 95/20291 discloses a method of hiding copyright related messages with a digital. data work, which relies on commonly occurring patterns or sequences of data in the work acting as signposts to target data elements which are modified according to certain rules. The disclosed method suffers from a lack of robustness to signal degradation.
The above references suffer from a disadvantage that they are concerned wholly or principally with the digital domain, and the disclosed techniques are not suited to the analog domain, in particular where digital to analog conversion and analog to digital conversion may easily lose or degrade individual pixel values.
In our copending application PCT/GB96/00246 (the national phase entry of which is U.S. application Ser. No. 08/875,546, filed Jul. 31, 1997), there is disclosed and claimed a method for inserting coded information into an image, comprising analysing the image, identifying strongly featured regions and inserting coded information into these regions. Because the method relies on an analysis of the entire image and code being inserted in strongly featured regions, rather than in individual pixels, as in the prior art, the code is better able to survive analog to digital conversions and digital to analog conversions, where there will inevitably be pixel misalignments between the original and processed images, and hence the pixel values will be apparently altered.
By "strongly featured regions" is meant regions of primary strength to which the eye responds in viewing an image, for example, textured regions or lines or boundaries between two regions of different luminance. In such regions, it is possible to insert a relatively large amount of information without significantly altering the image in its appearance to the eye. Edge regions between areas of different luminance are preferred since these are very distinctive and will permit code insertion without visibly degrading the image, and the coded information is inserted into such strongly featured regions by altering the structure of the image in such region in a predictable or identifiable manner. The image is altered by applying an insert function to an area including the strongly featured region, which insert function gradually decreases in intensity from the centre of its region of application, so as to blend with the surrounding region.
A main advantage of applying the coded information by altering the image in a predictable or identifiable manner, is that the information can be recovered in a decoding process at a remote location without having the original to hand.
As disclosed in PCT GB96/00246 the image, for example, a video frame or field, is divided up into a number M.times.N of blocks in M rows and N columns, each block comprising nxn pixel elements (e.g. 8.times.8). Strongly featured regions are searched in each block for insertion of code. In order to encode a significant amount of information into an image, it is necessary to apply the insertion function to a number of edges in the image. If for example, one edge is chosen in each block into which the image is divided, then in order to increase confidence when attempting to recognise the code, the edges in one row may be encoded according to two separate pseudo-random codes, representing a "1" or "0".
Prior to inserting the information, the image is assessed as to whether the image is suitable for code insertion, for example, the degree of consistency of the edge, the definition of the edge centre to prevent insertions when the image is determined to be unsuitable. Problems have arisen in the method described in PCT/GB96/00246 where more than one distinct edge is present in the image, or the part of the image under consideration for code insertion; for example there may be a corner feature.
An object of the present invention is to provide a method of embedding coded information into images by adding into the image a function which is dependant on the edge activity in the image.
The present invention accordingly provides in one aspect a method for inserting coded information into an image, comprising the steps of analysing the image, identifying edge regions calculating the strength of the detected edge and producing an edge function dependent on the strength of the edge, and adding the edge function to the image in order to represent coded information.
In accordance with the present invention, an image (or block within an image) may be selected to be encoded using an edge detection based scheme, the selection being dependant on the edge activity in the block. This allows for encoding of blocks with multiple features such as blocks containing a corner or block containing two edges. In these blocks, an edge detection scheme is applied to the block to produce a function within the block which has a value at each pixel, which is related to the strength of the edge at that pixel. This edge function is suitably scaled, and optionally multiplied by a circular function centred on the centre of the block. The scaled edge function is then added to the image on a pixel by pixel basis, with the sign of the function, plus or minus, representing a "1" or "0" bit of information. In a decoding operation, edges are detected and an estimate is made of the appropriate edge function. This estimate is then correlated with the image in order to reveal the existence of coded information.
In another aspect, the invention provides a method of decoding information contained in an image, the method comprising analysing the image, identifying edge regions and providing an estimate of the edge function dependent on the strength of the edge, and correlating the estimated edge function with the image in order to identify coded information present within the image.
As preferred, the image may be divided into M.times.N blocks, and an encoding/decoding operation is carried out on each block. Further, in accordance with the invention, an assessment is made of the type of features present in the image or image block, and a coding function is added to the image, the type of function depending on the type of image, as more fully described in our Application PCT/GB96/00246. Thus if only a single main edge is present, then an elliptical function may be added centred on the edge, if no distinct feature is present, then a circular function may be added, and if more than one distinct edge is present, then the edge function of the present invention may be added.
Another aspect of the present invention concerns synchronising the decoding process. An encoded image may be presented to the decoder in a geometrically altered state from which it was encoded. The geometric transformation may be for example an offset (x,y) translation, or a scaling in one or both axes (including different scaling in each axis), or a rotation. If the geometric transformation is of a significant size, then in order to decode it, this geometric distortion must be accounted for. The decoder synchronising process achieves this by an analysis process involving splitting the image into blocks, analysing the blocks for the type of insert and decoding the block accordingly. The process produces a measure of coded insets and their centres and the regularity of their structure. The offsets, scaling and rotations are then calculated from the geometric variations of the centres and structure. This is then used to correct the image before the final decoding.